﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using QLT_BLL;
using QLT_Public;
using QLThuoc_report;

namespace GiaoDien
{
    public partial class uc_ThongKe_LoaiThuoc : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_ThongKe_LoaiThuoc()
        {
            InitializeComponent();
        }
        ThongKe_BLL thongKe_bll = new ThongKe_BLL();
        private void uc_ThongKe_LoaiThuoc_Load(object sender, EventArgs e)
        {
            gridControl1.DataSource = thongKe_bll.LayDuLieu();
        }

        private void bbi_XemChiTiet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frm_ThongKe_LoaiThuoc f = new frm_ThongKe_LoaiThuoc();
            f.TenLoaiThuoc = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Tên Loại Thuốc").ToString();
            f.ShowDialog();
        }

        private void gridControl1_DoubleClick(object sender, EventArgs e)
        {
            frm_ThongKe_LoaiThuoc f = new frm_ThongKe_LoaiThuoc();
            f.TenLoaiThuoc = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Tên Loại Thuốc").ToString();
            f.ShowDialog();
        }

        private void bbi_IN_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            LoaiThuoc f = new LoaiThuoc();
            f.ShowDialog();
        }

    }
}
